package com.crime.crimemonitorclient;

import java.net.URL;

import android.location.Location;

public class KodAktualnihoUtvaruLoadingFragment extends RetainedAsyncTaskFragment<String, OnKodAktualnihoUtvaruLoaded>
{
	private URL mServiceURL;
	private Location mLocation;
	
	public final URL getServiceURL()
	{
		return this.mServiceURL;
	}

	public final void setServiceURL(URL serviceURL)
	{
		this.mServiceURL = serviceURL;
	}

	public final Location getLocation()
	{
		return this.mLocation;
	}

	public final void setLocation(Location location)
	{
		this.mLocation = location;
	}

	@Override
	protected RetainedAsyncTask<String> createTask()
	{
		return new GetKodAktualnihoUtvaruAsyncTask(mServiceURL, mLocation, this);
	}

	@Override
	protected void callResultHandler(String result)
	{
		mResultHandler.onKodAktualnihoUtvaruLoaded(result, mLocation);
	}

	@Override
	protected int getCancelledMessageResourceStringId()
	{
		return R.string.crime_summary_kod_aktualniho_utvaru_cancelled;
	}

	@Override
	protected CharSequence getProgressDialogTitle()
	{
		return "";
	}
}
